/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package test;

import java.util.List;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.mortbay.jetty.pico.dao.category.CategoryDAO;
import org.mortbay.jetty.pico.dao.category.CategoryDAOImpl;
import org.mortbay.jetty.pico.entities.Category;
import org.mortbay.jetty.pico.util.HibernateUtil;

/**
 *
 * @author godfather
 */
public class Main {
    
    
    public static void main(String[] args) {
        try {
            //new Configuration()
            //SessionFactory sessionFactory = HibernateUtil.getSessionFactory();
            //Session session = sessionFactory.openSession();
               /** Starting the Transaction */
              //List <Category> categorys = session.createCriteria(Category.class).list(); 
              //System.out.println("size: "+ categorys.size());
              CategoryDAO categoryDAO = new CategoryDAOImpl();
              //categoryDAO.remove(new Category("kdfdfd"));
              System.out.println("size: "+categoryDAO.getList().size());
              /** Closing Session */
              //session.close();
            
        } catch (Exception e) {
            e.printStackTrace();
        }
        
        
    }
    
}
